package com.linjuke.mayouting.biz.bo;

import java.util.List;

import com.linjuke.mayouting.biz.ao.query.RoleQuery;
import com.linjuke.mayouting.biz.dal.dataobject.RoleDO;
import com.linjuke.mayouting.biz.dal.dataobject.UserDO;
import com.linjuke.mayouting.common.enums.Permission;

public interface RoleBO {

	public abstract int update(RoleDO role);

	public abstract void removePermission(int roleId, int permissionId);

	public abstract void removeUser(int roleId, int userId);

	public abstract List<RoleDO> queryRoleByUserId(int userId);

	public abstract RoleDO queryById(int id);

	public abstract int delete(int id);
	
	public abstract int removeAllForUser(int userId);

	public abstract int create(RoleDO role);

	public abstract void addPermission(int roleId, int permissionId);

	public abstract void addUser(int roleId, int userId);

	public abstract List<Permission> queryPermissionByRoleId(int roleId);
	
	public abstract List<UserDO> queryUserByRoleId(int roleId);

	public abstract List<Permission> queryPermissionByUserId(int userId);
	
	public abstract List<RoleDO> queryForPage(RoleQuery roleQuery);
	
	public abstract int removePermissions(int roleId);

	public abstract int removeUsers(int roleId);

}
